# Contributor: Thomas Deutsch <thomas@tuxpeople.org>
# Maintainer: Thomas Deutsch <thomas@tuxpeople.org>
pkgname=lazygit
pkgver=0.34
pkgrel=1
pkgdesc="Simple terminal UI for git commands"
url="https://github.com/jesseduffield/lazygit"
arch="all"
license="MIT"
depends="ncurses"
makedepends="go"
options="!check" # FIXME: https://github.com/jesseduffield/lazygit/issues/1009
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jesseduffield/lazygit/archive/v$pkgver.tar.gz"

export GOPATH="$srcdir"
export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"

build() {
	go build -ldflags="-X main.version=$pkgver" -v
}

package() {
	install -Dm0755 $pkgname -t "$pkgdir"/usr/bin

	mkdir -p "$pkgdir"/usr/share/doc
	mv docs "$pkgdir"/usr/share/doc/"$pkgname"
	install -Dm0644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"
}


sha512sums="
a63dd877220c124282667acaadd2f9c55c47687e0c65caff9f61c5a6a3cecc202501fdbd3a1ee13752c8e68bbbb920b5b198459e71a44c585d594675b931d5c2  lazygit-0.34.tar.gz
"
